package cn.xiaye.blog.servlet;

import cn.xiaye.blog.bean.Context;
import cn.xiaye.blog.dao.UserDao;

@SuppressWarnings("serial")
public class Login extends FatherServlet {

	public String excute(Context context){
		String name = context.getRequest().getParameter("txtUser");
		String password = context.getRequest().getParameter("txtPassword");
		
    	UserDao loginDao = new UserDao();
    	boolean isLogin = loginDao.login(name, password);
    	context.getSession().setAttribute("isLogin", isLogin);
    	return "ShowMainPage";
    }

}
